import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus'
import axios from 'axios' //全局引入axios

import 'element-plus/dist/index.css'
//全局样式
import "@/assets/css/reset.css"
// 引入icon
import "@/assets/font/iconfont.css"

const app = createApp(App)

const baseUrl = "http://localhost:4000"
axios.defaults.baseURL = baseUrl
axios.defaults.withCredentials = true //允许跨域携带cookie信息
app.config.globalProperties.$axios = axios  //设置全局的axios,为所有的组件实例添加$axios属性


app.use(ElementPlus)
app.use(store).use(router).mixin({
    data() {
        return { baseUrl }
    }
}).mount('#app')
